#!/usr/bin/env python3
import os, sys, signal

def sigint(*a):
	print("\n*break*")
	sys.exit(0)

if __name__ == "__main__":
	signal.signal(signal.SIGINT, sigint)

	import gi
	gi.require_version('Gtk', '3.0') 
	gi.require_version('GdkX11', '3.0') 
	gi.require_version('Rsvg', '2.0') 
	
	from scc.tools import init_logging
	from scc.paths import get_share_path
	init_logging()

	from gi.repository import Gtk, GObject
	glades = os.path.join(get_share_path(), "glade")
	images = os.path.join(get_share_path(), "images")
	if Gtk.IconTheme.get_default():
		Gtk.IconTheme.get_default().append_search_path(images)
	#GObject.threads_init()
	
	from scc.gui.app import App
	App(glades, images).run(sys.argv)
